/**
 * Copyright (C), 2019-2022, 宇信融汇
 * FileName: ArrayDemo02
 * Author:   666
 * Date:     2022/1/10 23:29
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 666           修改时间           版本号              描述
 */
package com.day02.array;

/**
 * @Classname ArrayDemo02
 * @Description TODO
 * @Date 2022/1/10 23:29
 * @Created by 666
 */
public class ArrayDemo02 {
    public static void main(String[] args) {
        int[] a = {43,51,44,66,32,6};
        int max = a[0];
        int min = a[0];
        for (int i = 0; i < a.length; i++) {
            if(a[i]>max){
                max = a[i];
            }
            if(a[i]<min){
                min = a[i];
            }
        }
        System.out.println(max+"---"+min);
    }
}
